﻿using UMLObjects;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.ObjectModel;

namespace TestUMLObjects
{
    
    
    /// <summary>
    ///This is a test class for ActivityDiagramTest and is intended
    ///to contain all ActivityDiagramTest Unit Tests
    ///</summary>
    [TestClass()]
    public class ActivityDiagramTest
    {


        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        #region Additional test attributes
        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion


        /// <summary>
        ///A test for Activities
        ///</summary>
        [TestMethod()]
        public void ActivitiesTest()
        { 
            ObservableCollection<Activity> testList = new ObservableCollection<Activity>();
            Activity test1 = new Activity();
            Activity test2 = new Activity();
            testList.Add(test1);
            testList.Add(test2);
            
            ActivityDiagram target = new ActivityDiagram(); // TODO: Initialize to an appropriate value
            ObservableCollection<Activity> expected = testList; // TODO: Initialize to an appropriate value
            ObservableCollection<Activity> actual;
            target.Activities = expected;
            actual = target.Activities;
            Assert.AreEqual(expected, actual);
        }

        /// <summary>
        ///A test for Arrows
        ///</summary>
        [TestMethod()]
        public void ArrowsTest()
        {
            ObservableCollection<Arrow> testList = new ObservableCollection<Arrow>();
            Arrow test1 = new Arrow();
            Arrow test2 = new Arrow();
            testList.Add(test1);
            testList.Add(test2);

            ActivityDiagram target = new ActivityDiagram(); // TODO: Initialize to an appropriate value
            ObservableCollection<Arrow> expected = testList; // TODO: Initialize to an appropriate value
            ObservableCollection<Arrow> actual;
            target.Arrows = expected;
            actual = target.Arrows;
            Assert.AreEqual(expected, actual);
        }

        /// <summary>
        ///A test for Decisions
        ///</summary>
        [TestMethod()]
        public void DecisionsTest()
        {
            ObservableCollection<Decision> testList = new ObservableCollection<Decision>();
            Decision test1 = new Decision();
            Decision test2 = new Decision();
            testList.Add(test1);
            testList.Add(test2);
            
            ActivityDiagram target = new ActivityDiagram(); // TODO: Initialize to an appropriate value
            ObservableCollection<Decision> expected = testList; // TODO: Initialize to an appropriate value
            ObservableCollection<Decision> actual;
            target.Decisions = expected;
            actual = target.Decisions;
            Assert.AreEqual(expected, actual);
        }

        /// <summary>
        ///A test for FinalStates
        ///</summary>
        [TestMethod()]
        public void FinalStatesTest()
        {
            ObservableCollection<FinalState> testList = new ObservableCollection<FinalState>();
            FinalState test1 = new FinalState();
            FinalState test2 = new FinalState();
            testList.Add(test1);
            testList.Add(test2);
            
            ActivityDiagram target = new ActivityDiagram(); // TODO: Initialize to an appropriate value
            ObservableCollection<FinalState> expected = testList; // TODO: Initialize to an appropriate value
            ObservableCollection<FinalState> actual;
            target.FinalStates = expected;
            actual = target.FinalStates;
            Assert.AreEqual(expected, actual);
        }

        /// <summary>
        ///A test for InitialStates
        ///</summary>
        [TestMethod()]
        public void InitialStatesTest()
        {
            ObservableCollection<InitialState> testList = new ObservableCollection<InitialState>();
            InitialState test1 = new InitialState();
            InitialState test2 = new InitialState();
            testList.Add(test1);
            testList.Add(test2);
            
            ActivityDiagram target = new ActivityDiagram(); // TODO: Initialize to an appropriate value
            ObservableCollection<InitialState> expected = testList; // TODO: Initialize to an appropriate value
            ObservableCollection<InitialState> actual;
            target.InitialStates = expected;
            actual = target.InitialStates;
            Assert.AreEqual(expected, actual);
        }

        /// <summary>
        ///A test for name
        ///</summary>
        [TestMethod()]
        public void nameTest()
        {
            ActivityDiagram target = new ActivityDiagram(); // TODO: Initialize to an appropriate value
            string expected = "var1"; // TODO: Initialize to an appropriate value
            string actual;
            target.name = expected;
            actual = target.name;
            Assert.AreEqual(expected, actual);
        }
    }
}
